/** @file

  Copyright 2006 - 2013 Unified EFI, Inc.<BR>
  Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>

  This program and the accompanying materials
  are licensed and made available under the terms and conditions of the BSD License
  which accompanies this distribution.  The full text of the license may be found at 
  http://opensource.org/licenses/bsd-license.php
 
  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
**/
/*++

Module Name:
  AuthVariableServicesBBTestFunction.c

Abstract:
  Auth Variable Black-Box Function Test.

--*/

#include "SctLib.h"
#include "VariableServicesBBTestMain.h"
#include "AuthVariableServicesBBTest.h"


STATIC UINT8 mAuthVarDERCreateKey0[] = {
0xdc, 0x07, 0x0b, 0x0f, 0x09, 0x20, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x13, 0x03, 0x00, 0x00, 0x00, 0x02, 0xf1, 0x0e, 0x9d, 0xd2, 0xaf, 0x4a, 0xdf, 0x68, 0xee, 0x49,
0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7, 0x30, 0x82, 0x02, 0xf7, 0x02, 0x01, 0x01, 0x31,
0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00,
0x30, 0x0b, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, 0x01,
0xfd, 0x30, 0x82, 0x01, 0xf9, 0x30, 0x82, 0x01, 0x62, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10,
0xb7, 0xe3, 0xa9, 0x3a, 0x53, 0xe3, 0xcd, 0x83, 0x4c, 0xd7, 0x31, 0xdb, 0xa7, 0x46, 0x37, 0x9e,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30,
0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74,
0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x32, 0x31, 0x31, 0x31, 0x33,
0x30, 0x38, 0x31, 0x35, 0x31, 0x33, 0x5a, 0x17, 0x0d, 0x33, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32,
0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04,
0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31, 0x30, 0x81, 0x9f,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03,
0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xb1, 0x32, 0xda, 0xe7, 0xbe, 0xb8,
0xeb, 0x17, 0x15, 0x60, 0xf6, 0xbc, 0x45, 0x45, 0x8a, 0x20, 0x9d, 0xae, 0x94, 0x4a, 0x36, 0xde,
0x5e, 0x11, 0x92, 0x4a, 0x3f, 0xb9, 0x95, 0xb2, 0x15, 0x4e, 0x08, 0xb1, 0xbc, 0xb8, 0xb9, 0xce,
0xad, 0x44, 0xe5, 0x2f, 0xfd, 0x94, 0x3e, 0xa4, 0x20, 0x50, 0x93, 0x12, 0xe3, 0x5b, 0xa0, 0x31,
0xdb, 0xcd, 0x7a, 0x34, 0xd8, 0x00, 0xe3, 0xd2, 0x4a, 0xdb, 0x82, 0x09, 0x5c, 0x34, 0x3f, 0x88,
0x8b, 0x83, 0x0d, 0x57, 0xb4, 0xc8, 0x4d, 0x37, 0xe1, 0x66, 0xb1, 0x12, 0x50, 0xa8, 0x44, 0x6b,
0xf9, 0xae, 0xf3, 0x32, 0x66, 0x3c, 0x98, 0xbf, 0xca, 0x57, 0x31, 0x3b, 0x16, 0x77, 0xe6, 0x3d,
0x33, 0xf7, 0x93, 0x66, 0x19, 0x26, 0xfe, 0x18, 0xd3, 0xf8, 0x04, 0xf9, 0xa1, 0x92, 0x2f, 0x86,
0x18, 0xec, 0x80, 0x6e, 0x71, 0x65, 0xca, 0xea, 0x99, 0x37, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3,
0x4a, 0x30, 0x48, 0x30, 0x46, 0x06, 0x03, 0x55, 0x1d, 0x01, 0x04, 0x3f, 0x30, 0x3d, 0x80, 0x10,
0x0a, 0xc7, 0xc3, 0xae, 0x1f, 0xb9, 0x2e, 0x5a, 0x03, 0x23, 0x5e, 0x35, 0xf6, 0x03, 0xd6, 0xd7,
0xa1, 0x17, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54,
0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31, 0x82, 0x10, 0xb7, 0xe3, 0xa9, 0x3a, 0x53,
0xe3, 0xcd, 0x83, 0x4c, 0xd7, 0x31, 0xdb, 0xa7, 0x46, 0x37, 0x9e, 0x30, 0x0d, 0x06, 0x09, 0x2a,
0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x90, 0x44,
0xcc, 0x26, 0xdf, 0xbc, 0xa5, 0xb1, 0x76, 0xa1, 0xab, 0x3c, 0x02, 0x0c, 0x60, 0x51, 0x78, 0xcf,
0x5a, 0x16, 0x45, 0x47, 0x31, 0x18, 0x1a, 0x48, 0x36, 0xb0, 0xc2, 0xc5, 0xc1, 0x66, 0x3f, 0xf5,
0x35, 0x2d, 0xf8, 0xa9, 0x75, 0xa4, 0xff, 0xbe, 0x88, 0xed, 0xa6, 0x88, 0xf1, 0x78, 0xc6, 0x8c,
0x37, 0x05, 0xc4, 0x78, 0x73, 0xd9, 0xd4, 0x3b, 0xb8, 0x0f, 0x79, 0xff, 0x76, 0xe0, 0xfa, 0x67,
0x19, 0x85, 0xd5, 0xa4, 0xd4, 0x25, 0x36, 0x08, 0x78, 0x6f, 0x07, 0x93, 0x57, 0x1d, 0x76, 0x9d,
0xfb, 0x55, 0xcc, 0x13, 0xfc, 0x68, 0x57, 0x32, 0x2b, 0x64, 0x34, 0x03, 0x79, 0x9e, 0xcb, 0xbd,
0x4f, 0x06, 0xe8, 0x66, 0xe8, 0x7c, 0x9a, 0x1b, 0xa3, 0x5f, 0xb8, 0xc0, 0x03, 0x11, 0xa8, 0x1e,
0x95, 0x29, 0x86, 0x85, 0xc5, 0x32, 0xd4, 0x87, 0x1a, 0x94, 0x39, 0x54, 0xdd, 0x5a, 0x31, 0x81,
0xd2, 0x30, 0x81, 0xcf, 0x02, 0x01, 0x01, 0x30, 0x29, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06,
0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31,
0x02, 0x10, 0xb7, 0xe3, 0xa9, 0x3a, 0x53, 0xe3, 0xcd, 0x83, 0x4c, 0xd7, 0x31, 0xdb, 0xa7, 0x46,
0x37, 0x9e, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05,
0x00, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00,
0x04, 0x81, 0x80, 0x5d, 0xbe, 0x2b, 0x6e, 0x80, 0x4b, 0xb2, 0xd6, 0x54, 0x73, 0x2d, 0xfb, 0x0a,
0x6a, 0x5e, 0x09, 0xa3, 0xe7, 0x53, 0xfa, 0x5f, 0xf4, 0x61, 0x25, 0xd0, 0x7b, 0xe1, 0x45, 0x5d,
0xea, 0x4d, 0x37, 0x16, 0x02, 0xa5, 0xff, 0x08, 0x55, 0x04, 0xd3, 0xcc, 0xc6, 0xd3, 0x0b, 0x0f,
0x1d, 0x53, 0x5b, 0x84, 0x01, 0xc9, 0x48, 0x5c, 0x85, 0xff, 0x35, 0x4c, 0xc6, 0x09, 0x40, 0x82,
0x5d, 0xd5, 0x7b, 0x03, 0xa3, 0xd5, 0xc0, 0xa9, 0xed, 0xcd, 0x34, 0x7a, 0xaf, 0x00, 0x61, 0x39,
0x14, 0xc3, 0x2b, 0x93, 0xf1, 0x4b, 0x6a, 0x4d, 0x28, 0x8b, 0xe7, 0xc8, 0x9a, 0xd3, 0x1b, 0xd1,
0x3e, 0x18, 0xf6, 0x8e, 0xa2, 0x5b, 0x48, 0x72, 0xaa, 0x3b, 0xa9, 0xd0, 0x3b, 0x32, 0xab, 0xc1,
0xf8, 0x0f, 0x42, 0x72, 0x98, 0x62, 0x2f, 0x54, 0x83, 0x75, 0xd5, 0xc1, 0x1a, 0xde, 0xac, 0x49,
0xfe, 0xc9, 0xab, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39 
};

STATIC UINT8 mAuthVarDERModifyKey0[] = {
	// This varible is changed in time stamp and data both
	// the verificaion is compare the time stamp and then calculate the hash and do the comparation.
0xdd, 0x07, 0x0b, 0x0f, 0x09, 0x20, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  //0xdc ->0xdd
0x13, 0x03, 0x00, 0x00, 0x00, 0x02, 0xf1, 0x0e, 0x9d, 0xd2, 0xaf, 0x4a, 0xdf, 0x68, 0xee, 0x49,
0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7, 0x30, 0x82, 0x02, 0xf7, 0x02, 0x01, 0x01, 0x31,
0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00,
0x30, 0x0b, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, 0x01,
0xfd, 0x30, 0x82, 0x01, 0xf9, 0x30, 0x82, 0x01, 0x62, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10,
0xb7, 0xe3, 0xa9, 0x3a, 0x53, 0xe3, 0xcd, 0x83, 0x4c, 0xd7, 0x31, 0xdb, 0xa7, 0x46, 0x37, 0x9e,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30,
0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74,
0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x32, 0x31, 0x31, 0x31, 0x33,
0x30, 0x38, 0x31, 0x35, 0x31, 0x33, 0x5a, 0x17, 0x0d, 0x33, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32,
0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04,
0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31, 0x30, 0x81, 0x9f,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03,
0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xb1, 0x32, 0xda, 0xe7, 0xbe, 0xb8,
0xeb, 0x17, 0x15, 0x60, 0xf6, 0xbc, 0x45, 0x45, 0x8a, 0x20, 0x9d, 0xae, 0x94, 0x4a, 0x36, 0xde,
0x5e, 0x11, 0x92, 0x4a, 0x3f, 0xb9, 0x95, 0xb2, 0x15, 0x4e, 0x08, 0xb1, 0xbc, 0xb8, 0xb9, 0xce,
0xad, 0x44, 0xe5, 0x2f, 0xfd, 0x94, 0x3e, 0xa4, 0x20, 0x50, 0x93, 0x12, 0xe3, 0x5b, 0xa0, 0x31,
0xdb, 0xcd, 0x7a, 0x34, 0xd8, 0x00, 0xe3, 0xd2, 0x4a, 0xdb, 0x82, 0x09, 0x5c, 0x34, 0x3f, 0x88,
0x8b, 0x83, 0x0d, 0x57, 0xb4, 0xc8, 0x4d, 0x37, 0xe1, 0x66, 0xb1, 0x12, 0x50, 0xa8, 0x44, 0x6b,
0xf9, 0xae, 0xf3, 0x32, 0x66, 0x3c, 0x98, 0xbf, 0xca, 0x57, 0x31, 0x3b, 0x16, 0x77, 0xe6, 0x3d,
0x33, 0xf7, 0x93, 0x66, 0x19, 0x26, 0xfe, 0x18, 0xd3, 0xf8, 0x04, 0xf9, 0xa1, 0x92, 0x2f, 0x86,
0x18, 0xec, 0x80, 0x6e, 0x71, 0x65, 0xca, 0xea, 0x99, 0x37, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3,
0x4a, 0x30, 0x48, 0x30, 0x46, 0x06, 0x03, 0x55, 0x1d, 0x01, 0x04, 0x3f, 0x30, 0x3d, 0x80, 0x10,
0x0a, 0xc7, 0xc3, 0xae, 0x1f, 0xb9, 0x2e, 0x5a, 0x03, 0x23, 0x5e, 0x35, 0xf6, 0x03, 0xd6, 0xd7,
0xa1, 0x18, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54,     //0x17->0x18
0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31, 0x82, 0x10, 0xb7, 0xe3, 0xa9, 0x3a, 0x53,
0xe3, 0xcd, 0x83, 0x4c, 0xd7, 0x31, 0xdb, 0xa7, 0x46, 0x37, 0x9e, 0x30, 0x0d, 0x06, 0x09, 0x2a,
0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x90, 0x44,
0xcc, 0x26, 0xdf, 0xbc, 0xa5, 0xb1, 0x76, 0xa1, 0xab, 0x3c, 0x02, 0x0c, 0x60, 0x51, 0x78, 0xcf,
0x5a, 0x16, 0x45, 0x47, 0x31, 0x18, 0x1a, 0x48, 0x36, 0xb0, 0xc2, 0xc5, 0xc1, 0x66, 0x3f, 0xf5,
0x35, 0x2d, 0xf8, 0xa9, 0x75, 0xa4, 0xff, 0xbe, 0x88, 0xed, 0xa6, 0x88, 0xf1, 0x78, 0xc6, 0x8c,
0x37, 0x05, 0xc4, 0x78, 0x73, 0xd9, 0xd4, 0x3b, 0xb8, 0x0f, 0x79, 0xff, 0x76, 0xe0, 0xfa, 0x67,
0x19, 0x85, 0xd5, 0xa4, 0xd4, 0x25, 0x36, 0x08, 0x78, 0x6f, 0x07, 0x93, 0x57, 0x1d, 0x76, 0x9d,
0xfb, 0x55, 0xcc, 0x13, 0xfc, 0x68, 0x57, 0x32, 0x2b, 0x64, 0x34, 0x03, 0x79, 0x9e, 0xcb, 0xbd,
0x4f, 0x06, 0xe8, 0x66, 0xe8, 0x7c, 0x9a, 0x1b, 0xa3, 0x5f, 0xb8, 0xc0, 0x03, 0x11, 0xa8, 0x1e,
0x95, 0x29, 0x86, 0x85, 0xc5, 0x32, 0xd4, 0x87, 0x1a, 0x94, 0x39, 0x54, 0xdd, 0x5a, 0x31, 0x81,
0xd2, 0x30, 0x81, 0xcf, 0x02, 0x01, 0x01, 0x30, 0x29, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06,
0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31,
0x02, 0x10, 0xb7, 0xe3, 0xa9, 0x3a, 0x53, 0xe3, 0xcd, 0x83, 0x4c, 0xd7, 0x31, 0xdb, 0xa7, 0x46,
0x37, 0x9e, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05,
0x00, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00,
0x04, 0x81, 0x80, 0x5d, 0xbe, 0x2b, 0x6e, 0x80, 0x4b, 0xb2, 0xd6, 0x54, 0x73, 0x2d, 0xfb, 0x0a,
0x6a, 0x5e, 0x09, 0xa3, 0xe7, 0x53, 0xfa, 0x5f, 0xf4, 0x61, 0x25, 0xd0, 0x7b, 0xe1, 0x45, 0x5d,
0xea, 0x4d, 0x37, 0x16, 0x02, 0xa5, 0xff, 0x08, 0x55, 0x04, 0xd3, 0xcc, 0xc6, 0xd3, 0x0b, 0x0f,
0x1d, 0x53, 0x5b, 0x84, 0x01, 0xc9, 0x48, 0x5c, 0x85, 0xff, 0x35, 0x4c, 0xc6, 0x09, 0x40, 0x82,
0x5d, 0xd5, 0x7b, 0x03, 0xa3, 0xd5, 0xc0, 0xa9, 0xed, 0xcd, 0x34, 0x7a, 0xaf, 0x00, 0x61, 0x39,
0x14, 0xc3, 0x2b, 0x93, 0xf1, 0x4b, 0x6a, 0x4d, 0x28, 0x8b, 0xe7, 0xc8, 0x9a, 0xd3, 0x1b, 0xd1,
0x3e, 0x18, 0xf6, 0x8e, 0xa2, 0x5b, 0x48, 0x72, 0xaa, 0x3b, 0xa9, 0xd0, 0x3b, 0x32, 0xab, 0xc1,
0xf8, 0x0f, 0x42, 0x72, 0x98, 0x62, 0x2f, 0x54, 0x83, 0x75, 0xd5, 0xc1, 0x1a, 0xde, 0xac, 0x49,
0xfe, 0xc9, 0xab, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39 
};

STATIC UINT8 mAuthVarDERNewValueKey0[] = {
0xdc, 0x07, 0x0b, 0x0f, 0x09, 0x36, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x13, 0x03, 0x00, 0x00, 0x00, 0x02, 0xf1, 0x0e, 0x9d, 0xd2, 0xaf, 0x4a, 0xdf, 0x68, 0xee, 0x49,
0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7, 0x30, 0x82, 0x02, 0xf7, 0x02, 0x01, 0x01, 0x31,
0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00,
0x30, 0x0b, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, 0x01,
0xfd, 0x30, 0x82, 0x01, 0xf9, 0x30, 0x82, 0x01, 0x62, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10,
0xb7, 0xe3, 0xa9, 0x3a, 0x53, 0xe3, 0xcd, 0x83, 0x4c, 0xd7, 0x31, 0xdb, 0xa7, 0x46, 0x37, 0x9e,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30,
0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74,
0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x32, 0x31, 0x31, 0x31, 0x33,
0x30, 0x38, 0x31, 0x35, 0x31, 0x33, 0x5a, 0x17, 0x0d, 0x33, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32,
0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04,
0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31, 0x30, 0x81, 0x9f,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03,
0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xb1, 0x32, 0xda, 0xe7, 0xbe, 0xb8,
0xeb, 0x17, 0x15, 0x60, 0xf6, 0xbc, 0x45, 0x45, 0x8a, 0x20, 0x9d, 0xae, 0x94, 0x4a, 0x36, 0xde,
0x5e, 0x11, 0x92, 0x4a, 0x3f, 0xb9, 0x95, 0xb2, 0x15, 0x4e, 0x08, 0xb1, 0xbc, 0xb8, 0xb9, 0xce,
0xad, 0x44, 0xe5, 0x2f, 0xfd, 0x94, 0x3e, 0xa4, 0x20, 0x50, 0x93, 0x12, 0xe3, 0x5b, 0xa0, 0x31,
0xdb, 0xcd, 0x7a, 0x34, 0xd8, 0x00, 0xe3, 0xd2, 0x4a, 0xdb, 0x82, 0x09, 0x5c, 0x34, 0x3f, 0x88,
0x8b, 0x83, 0x0d, 0x57, 0xb4, 0xc8, 0x4d, 0x37, 0xe1, 0x66, 0xb1, 0x12, 0x50, 0xa8, 0x44, 0x6b,
0xf9, 0xae, 0xf3, 0x32, 0x66, 0x3c, 0x98, 0xbf, 0xca, 0x57, 0x31, 0x3b, 0x16, 0x77, 0xe6, 0x3d,
0x33, 0xf7, 0x93, 0x66, 0x19, 0x26, 0xfe, 0x18, 0xd3, 0xf8, 0x04, 0xf9, 0xa1, 0x92, 0x2f, 0x86,
0x18, 0xec, 0x80, 0x6e, 0x71, 0x65, 0xca, 0xea, 0x99, 0x37, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3,
0x4a, 0x30, 0x48, 0x30, 0x46, 0x06, 0x03, 0x55, 0x1d, 0x01, 0x04, 0x3f, 0x30, 0x3d, 0x80, 0x10,
0x0a, 0xc7, 0xc3, 0xae, 0x1f, 0xb9, 0x2e, 0x5a, 0x03, 0x23, 0x5e, 0x35, 0xf6, 0x03, 0xd6, 0xd7,
0xa1, 0x17, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54,
0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31, 0x82, 0x10, 0xb7, 0xe3, 0xa9, 0x3a, 0x53,
0xe3, 0xcd, 0x83, 0x4c, 0xd7, 0x31, 0xdb, 0xa7, 0x46, 0x37, 0x9e, 0x30, 0x0d, 0x06, 0x09, 0x2a,
0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x90, 0x44,
0xcc, 0x26, 0xdf, 0xbc, 0xa5, 0xb1, 0x76, 0xa1, 0xab, 0x3c, 0x02, 0x0c, 0x60, 0x51, 0x78, 0xcf,
0x5a, 0x16, 0x45, 0x47, 0x31, 0x18, 0x1a, 0x48, 0x36, 0xb0, 0xc2, 0xc5, 0xc1, 0x66, 0x3f, 0xf5,
0x35, 0x2d, 0xf8, 0xa9, 0x75, 0xa4, 0xff, 0xbe, 0x88, 0xed, 0xa6, 0x88, 0xf1, 0x78, 0xc6, 0x8c,
0x37, 0x05, 0xc4, 0x78, 0x73, 0xd9, 0xd4, 0x3b, 0xb8, 0x0f, 0x79, 0xff, 0x76, 0xe0, 0xfa, 0x67,
0x19, 0x85, 0xd5, 0xa4, 0xd4, 0x25, 0x36, 0x08, 0x78, 0x6f, 0x07, 0x93, 0x57, 0x1d, 0x76, 0x9d,
0xfb, 0x55, 0xcc, 0x13, 0xfc, 0x68, 0x57, 0x32, 0x2b, 0x64, 0x34, 0x03, 0x79, 0x9e, 0xcb, 0xbd,
0x4f, 0x06, 0xe8, 0x66, 0xe8, 0x7c, 0x9a, 0x1b, 0xa3, 0x5f, 0xb8, 0xc0, 0x03, 0x11, 0xa8, 0x1e,
0x95, 0x29, 0x86, 0x85, 0xc5, 0x32, 0xd4, 0x87, 0x1a, 0x94, 0x39, 0x54, 0xdd, 0x5a, 0x31, 0x81,
0xd2, 0x30, 0x81, 0xcf, 0x02, 0x01, 0x01, 0x30, 0x29, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06,
0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31,
0x02, 0x10, 0xb7, 0xe3, 0xa9, 0x3a, 0x53, 0xe3, 0xcd, 0x83, 0x4c, 0xd7, 0x31, 0xdb, 0xa7, 0x46,
0x37, 0x9e, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05,
0x00, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00,
0x04, 0x81, 0x80, 0x89, 0xac, 0xf4, 0x93, 0x0d, 0xcf, 0xc3, 0x95, 0x18, 0xf9, 0x9d, 0x91, 0xd2,
0x95, 0xb4, 0x5f, 0x80, 0x15, 0x7c, 0xe0, 0xde, 0xea, 0x8f, 0x63, 0x15, 0x46, 0xb4, 0xef, 0xb4,
0x05, 0x7a, 0x91, 0x84, 0xdf, 0x87, 0x7a, 0x57, 0x79, 0x80, 0xfe, 0xa5, 0xcc, 0x31, 0xec, 0xd0,
0x1c, 0x75, 0xc3, 0xb0, 0xad, 0x15, 0x46, 0x66, 0x5f, 0x65, 0x2e, 0x5d, 0x31, 0x2e, 0x6f, 0x7a,
0xef, 0x0b, 0x4f, 0x30, 0x44, 0x95, 0x09, 0xfc, 0x6c, 0x36, 0x43, 0x03, 0x4a, 0x3b, 0x80, 0xa2,
0xc9, 0xa4, 0xc7, 0xac, 0x53, 0xb5, 0xc3, 0xae, 0xaf, 0x0e, 0xa6, 0xc4, 0x2b, 0x1e, 0xcd, 0x0b,
0x12, 0x26, 0x07, 0x96, 0x32, 0x32, 0x6c, 0xb0, 0x42, 0x54, 0xf5, 0xa2, 0x8d, 0x71, 0xf9, 0xbf,
0xdb, 0x24, 0x0e, 0x36, 0x9b, 0xa3, 0x07, 0x0f, 0xf0, 0x27, 0x35, 0x9a, 0x0c, 0xfc, 0x20, 0x91,
0x83, 0x89, 0x46, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
0x37, 0x38, 0x39 };


STATIC UINT8 mAuthVarDERKey1[] = {
0xdc, 0x07, 0x0b, 0x0f, 0x0b, 0x11, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x13, 0x03, 0x00, 0x00, 0x00, 0x02, 0xf1, 0x0e, 0x9d, 0xd2, 0xaf, 0x4a, 0xdf, 0x68, 0xee, 0x49,
0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7, 0x30, 0x82, 0x02, 0xf7, 0x02, 0x01, 0x01, 0x31,
0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00,
0x30, 0x0b, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, 0x01,
0xfd, 0x30, 0x82, 0x01, 0xf9, 0x30, 0x82, 0x01, 0x62, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10,
0xf5, 0x2e, 0x37, 0xa1, 0x46, 0xba, 0xa3, 0xbf, 0x4d, 0xb5, 0xb9, 0xb3, 0xd1, 0xa1, 0x12, 0xa2,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30,
0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74,
0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x32, 0x31, 0x31, 0x31, 0x35,
0x30, 0x33, 0x31, 0x32, 0x31, 0x38, 0x5a, 0x17, 0x0d, 0x33, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32,
0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04,
0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32, 0x30, 0x81, 0x9f,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03,
0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xbc, 0x7f, 0x91, 0x7d, 0xbd, 0x73,
0x3a, 0xd5, 0x34, 0xdd, 0xdd, 0x02, 0x7b, 0x61, 0x7a, 0x9b, 0x75, 0x26, 0x80, 0x52, 0x4d, 0x4f,
0x9c, 0x77, 0xe0, 0x65, 0x88, 0x41, 0xbd, 0x1b, 0x2e, 0xe8, 0x2c, 0xb3, 0x23, 0xfe, 0xbd, 0x59,
0xb3, 0x86, 0x5d, 0x47, 0x89, 0xa0, 0x79, 0x18, 0x5b, 0x03, 0xeb, 0x93, 0xbf, 0xbe, 0x01, 0xc2,
0x89, 0x6f, 0xd1, 0x8f, 0xcd, 0x43, 0x29, 0x5c, 0xac, 0x1d, 0xbb, 0x94, 0x2e, 0xa0, 0x93, 0xf4,
0x75, 0xc0, 0x8f, 0x95, 0xb1, 0xed, 0x70, 0xd3, 0xee, 0x79, 0x45, 0x86, 0x43, 0x12, 0x1e, 0x98,
0x16, 0x87, 0x02, 0xe3, 0x4d, 0xeb, 0x84, 0x54, 0x51, 0x16, 0xf2, 0x90, 0x38, 0xf3, 0x16, 0xdf,
0x4c, 0xa7, 0x93, 0xf4, 0xda, 0x46, 0x9b, 0x97, 0xf9, 0x1a, 0x64, 0xa4, 0x63, 0x27, 0xdd, 0x63,
0xfd, 0xf5, 0x49, 0xa2, 0x88, 0x16, 0x16, 0x6c, 0xb7, 0x97, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3,
0x4a, 0x30, 0x48, 0x30, 0x46, 0x06, 0x03, 0x55, 0x1d, 0x01, 0x04, 0x3f, 0x30, 0x3d, 0x80, 0x10,
0x30, 0xee, 0xac, 0xc5, 0xef, 0x8c, 0x5d, 0xc9, 0x8d, 0x27, 0xf9, 0xf7, 0x10, 0x8e, 0x2a, 0x36,
0xa1, 0x17, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54,
0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32, 0x82, 0x10, 0xf5, 0x2e, 0x37, 0xa1, 0x46,
0xba, 0xa3, 0xbf, 0x4d, 0xb5, 0xb9, 0xb3, 0xd1, 0xa1, 0x12, 0xa2, 0x30, 0x0d, 0x06, 0x09, 0x2a,
0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x29, 0xee,
0xba, 0x06, 0x6c, 0x6a, 0xad, 0xb6, 0x4d, 0x06, 0x8e, 0xdd, 0xd8, 0x0c, 0x26, 0xee, 0x09, 0x0d,
0xf9, 0xbb, 0x44, 0x7f, 0x06, 0xd0, 0x76, 0xa8, 0xec, 0xb2, 0x72, 0xcc, 0xce, 0xd8, 0xcc, 0x7f,
0x37, 0x2c, 0xbc, 0x9d, 0xa0, 0x32, 0x29, 0x1e, 0xe4, 0x2f, 0x57, 0xe8, 0xcb, 0x74, 0xa4, 0x90,
0x60, 0x9c, 0xec, 0x61, 0x4f, 0x09, 0xe5, 0xc3, 0x44, 0x4a, 0xed, 0x8e, 0x44, 0x3a, 0xf0, 0x66,
0x31, 0xda, 0xb8, 0xd9, 0x2f, 0x38, 0x7c, 0xb3, 0xc9, 0x9b, 0xc4, 0xa3, 0x9f, 0x73, 0x95, 0x66,
0x18, 0x99, 0x9d, 0xdb, 0x36, 0x84, 0x40, 0x46, 0x35, 0x2b, 0x68, 0x95, 0xb7, 0x4e, 0x6f, 0x77,
0x07, 0x66, 0xdb, 0xde, 0x5f, 0x41, 0xd0, 0x19, 0xbd, 0x8e, 0x8f, 0x8b, 0x1f, 0x77, 0xff, 0x34,
0xa9, 0x7a, 0x58, 0xdc, 0x9f, 0x2d, 0xd6, 0x2c, 0xe6, 0x76, 0x0a, 0x92, 0x30, 0x47, 0x31, 0x81,
0xd2, 0x30, 0x81, 0xcf, 0x02, 0x01, 0x01, 0x30, 0x29, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06,
0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32,
0x02, 0x10, 0xf5, 0x2e, 0x37, 0xa1, 0x46, 0xba, 0xa3, 0xbf, 0x4d, 0xb5, 0xb9, 0xb3, 0xd1, 0xa1,
0x12, 0xa2, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05,
0x00, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00,
0x04, 0x81, 0x80, 0x3c, 0x6d, 0xb9, 0xfc, 0xf5, 0xc2, 0x51, 0x10, 0x40, 0x18, 0xae, 0xcd, 0xe8,
0x86, 0xdb, 0xfc, 0x8c, 0xd7, 0xfa, 0x61, 0x7d, 0xa8, 0xc8, 0x06, 0x01, 0xf2, 0x08, 0x2d, 0x22,
0x0c, 0x40, 0x25, 0xa8, 0xd4, 0x25, 0xad, 0x44, 0x53, 0xce, 0x30, 0x77, 0x1b, 0x88, 0xdc, 0xa2,
0x29, 0x4e, 0xec, 0x8c, 0x24, 0x6f, 0x17, 0x69, 0xed, 0x59, 0x7e, 0x73, 0x0d, 0xd8, 0x51, 0x68,
0xc3, 0x84, 0xe9, 0x46, 0x1b, 0x6b, 0x00, 0x5b, 0x64, 0xca, 0xf6, 0xac, 0x6e, 0x05, 0x41, 0x06,
0x3c, 0xbf, 0x9e, 0x57, 0x54, 0x27, 0x26, 0x96, 0x14, 0x3c, 0x2a, 0x62, 0x8a, 0xe8, 0x7f, 0x7f,
0xe5, 0x3d, 0x8d, 0x8f, 0x89, 0x81, 0x81, 0xbc, 0x68, 0xb1, 0x89, 0x21, 0x35, 0x59, 0xc6, 0x0b,
0x6f, 0xb7, 0x87, 0xe7, 0xdd, 0x17, 0x2f, 0x7b, 0x8b, 0x4a, 0x2d, 0x9c, 0xa0, 0x72, 0x21, 0xc4,
0x3d, 0xc1, 0xea, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
0x37, 0x38, 0x39 };

STATIC UINT8 mAuthVarDERAppendKey0[] = {
0xdc, 0x07, 0x0b, 0x0f, 0x0a, 0x28, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x13, 0x03, 0x00, 0x00, 0x00, 0x02, 0xf1, 0x0e, 0x9d, 0xd2, 0xaf, 0x4a, 0xdf, 0x68, 0xee, 0x49,
0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7, 0x30, 0x82, 0x02, 0xf7, 0x02, 0x01, 0x01, 0x31,
0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00,
0x30, 0x0b, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, 0x01,
0xfd, 0x30, 0x82, 0x01, 0xf9, 0x30, 0x82, 0x01, 0x62, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10,
0xb7, 0xe3, 0xa9, 0x3a, 0x53, 0xe3, 0xcd, 0x83, 0x4c, 0xd7, 0x31, 0xdb, 0xa7, 0x46, 0x37, 0x9e,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30,
0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74,
0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x32, 0x31, 0x31, 0x31, 0x33,
0x30, 0x38, 0x31, 0x35, 0x31, 0x33, 0x5a, 0x17, 0x0d, 0x33, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32,
0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04,
0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31, 0x30, 0x81, 0x9f,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03,
0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xb1, 0x32, 0xda, 0xe7, 0xbe, 0xb8,
0xeb, 0x17, 0x15, 0x60, 0xf6, 0xbc, 0x45, 0x45, 0x8a, 0x20, 0x9d, 0xae, 0x94, 0x4a, 0x36, 0xde,
0x5e, 0x11, 0x92, 0x4a, 0x3f, 0xb9, 0x95, 0xb2, 0x15, 0x4e, 0x08, 0xb1, 0xbc, 0xb8, 0xb9, 0xce,
0xad, 0x44, 0xe5, 0x2f, 0xfd, 0x94, 0x3e, 0xa4, 0x20, 0x50, 0x93, 0x12, 0xe3, 0x5b, 0xa0, 0x31,
0xdb, 0xcd, 0x7a, 0x34, 0xd8, 0x00, 0xe3, 0xd2, 0x4a, 0xdb, 0x82, 0x09, 0x5c, 0x34, 0x3f, 0x88,
0x8b, 0x83, 0x0d, 0x57, 0xb4, 0xc8, 0x4d, 0x37, 0xe1, 0x66, 0xb1, 0x12, 0x50, 0xa8, 0x44, 0x6b,
0xf9, 0xae, 0xf3, 0x32, 0x66, 0x3c, 0x98, 0xbf, 0xca, 0x57, 0x31, 0x3b, 0x16, 0x77, 0xe6, 0x3d,
0x33, 0xf7, 0x93, 0x66, 0x19, 0x26, 0xfe, 0x18, 0xd3, 0xf8, 0x04, 0xf9, 0xa1, 0x92, 0x2f, 0x86,
0x18, 0xec, 0x80, 0x6e, 0x71, 0x65, 0xca, 0xea, 0x99, 0x37, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3,
0x4a, 0x30, 0x48, 0x30, 0x46, 0x06, 0x03, 0x55, 0x1d, 0x01, 0x04, 0x3f, 0x30, 0x3d, 0x80, 0x10,
0x0a, 0xc7, 0xc3, 0xae, 0x1f, 0xb9, 0x2e, 0x5a, 0x03, 0x23, 0x5e, 0x35, 0xf6, 0x03, 0xd6, 0xd7,
0xa1, 0x17, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54,
0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31, 0x82, 0x10, 0xb7, 0xe3, 0xa9, 0x3a, 0x53,
0xe3, 0xcd, 0x83, 0x4c, 0xd7, 0x31, 0xdb, 0xa7, 0x46, 0x37, 0x9e, 0x30, 0x0d, 0x06, 0x09, 0x2a,
0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x90, 0x44,
0xcc, 0x26, 0xdf, 0xbc, 0xa5, 0xb1, 0x76, 0xa1, 0xab, 0x3c, 0x02, 0x0c, 0x60, 0x51, 0x78, 0xcf,
0x5a, 0x16, 0x45, 0x47, 0x31, 0x18, 0x1a, 0x48, 0x36, 0xb0, 0xc2, 0xc5, 0xc1, 0x66, 0x3f, 0xf5,
0x35, 0x2d, 0xf8, 0xa9, 0x75, 0xa4, 0xff, 0xbe, 0x88, 0xed, 0xa6, 0x88, 0xf1, 0x78, 0xc6, 0x8c,
0x37, 0x05, 0xc4, 0x78, 0x73, 0xd9, 0xd4, 0x3b, 0xb8, 0x0f, 0x79, 0xff, 0x76, 0xe0, 0xfa, 0x67,
0x19, 0x85, 0xd5, 0xa4, 0xd4, 0x25, 0x36, 0x08, 0x78, 0x6f, 0x07, 0x93, 0x57, 0x1d, 0x76, 0x9d,
0xfb, 0x55, 0xcc, 0x13, 0xfc, 0x68, 0x57, 0x32, 0x2b, 0x64, 0x34, 0x03, 0x79, 0x9e, 0xcb, 0xbd,
0x4f, 0x06, 0xe8, 0x66, 0xe8, 0x7c, 0x9a, 0x1b, 0xa3, 0x5f, 0xb8, 0xc0, 0x03, 0x11, 0xa8, 0x1e,
0x95, 0x29, 0x86, 0x85, 0xc5, 0x32, 0xd4, 0x87, 0x1a, 0x94, 0x39, 0x54, 0xdd, 0x5a, 0x31, 0x81,
0xd2, 0x30, 0x81, 0xcf, 0x02, 0x01, 0x01, 0x30, 0x29, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06,
0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31,
0x02, 0x10, 0xb7, 0xe3, 0xa9, 0x3a, 0x53, 0xe3, 0xcd, 0x83, 0x4c, 0xd7, 0x31, 0xdb, 0xa7, 0x46,
0x37, 0x9e, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05,
0x00, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00,
0x04, 0x81, 0x80, 0x97, 0x5d, 0xea, 0x2a, 0x9a, 0x02, 0x04, 0x28, 0x71, 0x61, 0x22, 0x09, 0xd3,
0xe9, 0x1e, 0xca, 0x68, 0x80, 0xb7, 0x2a, 0x99, 0xb2, 0x9f, 0x68, 0x70, 0x4d, 0x37, 0x79, 0xd5,
0x34, 0x78, 0x71, 0x08, 0x47, 0x7a, 0xad, 0x45, 0x72, 0x8e, 0x7d, 0x2c, 0x7c, 0xb2, 0xd3, 0x82,
0xa2, 0x28, 0xe5, 0xa9, 0x0a, 0x76, 0x1a, 0xcd, 0xe7, 0x8e, 0x1e, 0x04, 0x0f, 0xf0, 0xc1, 0xe7,
0x6d, 0xb5, 0xcb, 0x49, 0xbe, 0x56, 0x20, 0x0a, 0x6e, 0x17, 0x23, 0x3d, 0x21, 0xea, 0x62, 0xad,
0x7f, 0xd9, 0xbc, 0x42, 0x2f, 0x6a, 0x5c, 0x37, 0xfe, 0x3e, 0xa5, 0x30, 0xdf, 0x29, 0x7f, 0xa1,
0x73, 0x71, 0xf8, 0xbe, 0xd6, 0x22, 0x25, 0xac, 0xf1, 0xf7, 0x3d, 0xd8, 0x32, 0x92, 0xf8, 0x30,
0x3e, 0x18, 0xa8, 0xaa, 0xb6, 0xcf, 0x61, 0x90, 0xf0, 0x8f, 0x9b, 0xad, 0xd9, 0xbf, 0xfe, 0x68,
0x9d, 0x1a, 0x47, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
0x37, 0x38, 0x39
};

STATIC UINT8 mAuthVarDERDelKey0[] = {
0xdc, 0x07, 0x0b, 0x0f, 0x0a, 0x37, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x13, 0x03, 0x00, 0x00, 0x00, 0x02, 0xf1, 0x0e, 0x9d, 0xd2, 0xaf, 0x4a, 0xdf, 0x68, 0xee, 0x49,
0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7, 0x30, 0x82, 0x02, 0xf7, 0x02, 0x01, 0x01, 0x31,
0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00,
0x30, 0x0b, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, 0x01,
0xfd, 0x30, 0x82, 0x01, 0xf9, 0x30, 0x82, 0x01, 0x62, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10,
0xb7, 0xe3, 0xa9, 0x3a, 0x53, 0xe3, 0xcd, 0x83, 0x4c, 0xd7, 0x31, 0xdb, 0xa7, 0x46, 0x37, 0x9e,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30,
0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74,
0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x32, 0x31, 0x31, 0x31, 0x33,
0x30, 0x38, 0x31, 0x35, 0x31, 0x33, 0x5a, 0x17, 0x0d, 0x33, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32,
0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04,
0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31, 0x30, 0x81, 0x9f,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03,
0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xb1, 0x32, 0xda, 0xe7, 0xbe, 0xb8,
0xeb, 0x17, 0x15, 0x60, 0xf6, 0xbc, 0x45, 0x45, 0x8a, 0x20, 0x9d, 0xae, 0x94, 0x4a, 0x36, 0xde,
0x5e, 0x11, 0x92, 0x4a, 0x3f, 0xb9, 0x95, 0xb2, 0x15, 0x4e, 0x08, 0xb1, 0xbc, 0xb8, 0xb9, 0xce,
0xad, 0x44, 0xe5, 0x2f, 0xfd, 0x94, 0x3e, 0xa4, 0x20, 0x50, 0x93, 0x12, 0xe3, 0x5b, 0xa0, 0x31,
0xdb, 0xcd, 0x7a, 0x34, 0xd8, 0x00, 0xe3, 0xd2, 0x4a, 0xdb, 0x82, 0x09, 0x5c, 0x34, 0x3f, 0x88,
0x8b, 0x83, 0x0d, 0x57, 0xb4, 0xc8, 0x4d, 0x37, 0xe1, 0x66, 0xb1, 0x12, 0x50, 0xa8, 0x44, 0x6b,
0xf9, 0xae, 0xf3, 0x32, 0x66, 0x3c, 0x98, 0xbf, 0xca, 0x57, 0x31, 0x3b, 0x16, 0x77, 0xe6, 0x3d,
0x33, 0xf7, 0x93, 0x66, 0x19, 0x26, 0xfe, 0x18, 0xd3, 0xf8, 0x04, 0xf9, 0xa1, 0x92, 0x2f, 0x86,
0x18, 0xec, 0x80, 0x6e, 0x71, 0x65, 0xca, 0xea, 0x99, 0x37, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3,
0x4a, 0x30, 0x48, 0x30, 0x46, 0x06, 0x03, 0x55, 0x1d, 0x01, 0x04, 0x3f, 0x30, 0x3d, 0x80, 0x10,
0x0a, 0xc7, 0xc3, 0xae, 0x1f, 0xb9, 0x2e, 0x5a, 0x03, 0x23, 0x5e, 0x35, 0xf6, 0x03, 0xd6, 0xd7,
0xa1, 0x17, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54,
0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31, 0x82, 0x10, 0xb7, 0xe3, 0xa9, 0x3a, 0x53,
0xe3, 0xcd, 0x83, 0x4c, 0xd7, 0x31, 0xdb, 0xa7, 0x46, 0x37, 0x9e, 0x30, 0x0d, 0x06, 0x09, 0x2a,
0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x90, 0x44,
0xcc, 0x26, 0xdf, 0xbc, 0xa5, 0xb1, 0x76, 0xa1, 0xab, 0x3c, 0x02, 0x0c, 0x60, 0x51, 0x78, 0xcf,
0x5a, 0x16, 0x45, 0x47, 0x31, 0x18, 0x1a, 0x48, 0x36, 0xb0, 0xc2, 0xc5, 0xc1, 0x66, 0x3f, 0xf5,
0x35, 0x2d, 0xf8, 0xa9, 0x75, 0xa4, 0xff, 0xbe, 0x88, 0xed, 0xa6, 0x88, 0xf1, 0x78, 0xc6, 0x8c,
0x37, 0x05, 0xc4, 0x78, 0x73, 0xd9, 0xd4, 0x3b, 0xb8, 0x0f, 0x79, 0xff, 0x76, 0xe0, 0xfa, 0x67,
0x19, 0x85, 0xd5, 0xa4, 0xd4, 0x25, 0x36, 0x08, 0x78, 0x6f, 0x07, 0x93, 0x57, 0x1d, 0x76, 0x9d,
0xfb, 0x55, 0xcc, 0x13, 0xfc, 0x68, 0x57, 0x32, 0x2b, 0x64, 0x34, 0x03, 0x79, 0x9e, 0xcb, 0xbd,
0x4f, 0x06, 0xe8, 0x66, 0xe8, 0x7c, 0x9a, 0x1b, 0xa3, 0x5f, 0xb8, 0xc0, 0x03, 0x11, 0xa8, 0x1e,
0x95, 0x29, 0x86, 0x85, 0xc5, 0x32, 0xd4, 0x87, 0x1a, 0x94, 0x39, 0x54, 0xdd, 0x5a, 0x31, 0x81,
0xd2, 0x30, 0x81, 0xcf, 0x02, 0x01, 0x01, 0x30, 0x29, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06,
0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x31,
0x02, 0x10, 0xb7, 0xe3, 0xa9, 0x3a, 0x53, 0xe3, 0xcd, 0x83, 0x4c, 0xd7, 0x31, 0xdb, 0xa7, 0x46,
0x37, 0x9e, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05,
0x00, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00,
0x04, 0x81, 0x80, 0x70, 0x3b, 0x83, 0xfd, 0xf6, 0x9d, 0xc9, 0xfa, 0xb0, 0x73, 0xfe, 0xb3, 0xae,
0x32, 0x81, 0x61, 0x0f, 0xa4, 0x2f, 0x6f, 0x89, 0xa6, 0xbf, 0xcb, 0x4a, 0x49, 0xd0, 0x6c, 0x26,
0x35, 0xc4, 0xbe, 0xc6, 0x54, 0x35, 0x54, 0x52, 0x02, 0x0f, 0x92, 0xeb, 0x29, 0x9d, 0x24, 0x4d,
0xce, 0x00, 0x41, 0x78, 0x18, 0xad, 0x57, 0x8e, 0x7b, 0x94, 0x19, 0xea, 0x1b, 0x42, 0xc8, 0xef,
0xe8, 0x4f, 0x8e, 0xdd, 0x00, 0x0d, 0x57, 0x4e, 0x9b, 0x5c, 0x41, 0x20, 0xfb, 0xc9, 0x4b, 0xb4,
0x7f, 0x0b, 0x3e, 0x19, 0x19, 0x6b, 0xe9, 0x4c, 0x0b, 0x93, 0x88, 0xf4, 0x2c, 0x89, 0x31, 0xfe,
0x7c, 0xe8, 0x19, 0x49, 0x17, 0x64, 0xd7, 0x3d, 0x6a, 0x38, 0xd6, 0x75, 0xd4, 0x9d, 0x8c, 0xa5,
0xc1, 0x6c, 0xc2, 0x83, 0xdd, 0x95, 0x46, 0xd6, 0xa7, 0x9d, 0xfc, 0x17, 0xd6, 0x7c, 0x54, 0x1b,
0x24, 0x5a, 0x88 
};

STATIC UINT8 mAuthVarDERCreateKey1[] = {     //it is same as mAuthVarDERKey1
0xdc, 0x07, 0x0b, 0x0f, 0x0b, 0x11, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x13, 0x03, 0x00, 0x00, 0x00, 0x02, 0xf1, 0x0e, 0x9d, 0xd2, 0xaf, 0x4a, 0xdf, 0x68, 0xee, 0x49,
0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7, 0x30, 0x82, 0x02, 0xf7, 0x02, 0x01, 0x01, 0x31,
0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00,
0x30, 0x0b, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, 0x01,
0xfd, 0x30, 0x82, 0x01, 0xf9, 0x30, 0x82, 0x01, 0x62, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10,
0xf5, 0x2e, 0x37, 0xa1, 0x46, 0xba, 0xa3, 0xbf, 0x4d, 0xb5, 0xb9, 0xb3, 0xd1, 0xa1, 0x12, 0xa2,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30,
0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74,
0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x32, 0x31, 0x31, 0x31, 0x35,
0x30, 0x33, 0x31, 0x32, 0x31, 0x38, 0x5a, 0x17, 0x0d, 0x33, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32,
0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04,
0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32, 0x30, 0x81, 0x9f,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03,
0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xbc, 0x7f, 0x91, 0x7d, 0xbd, 0x73,
0x3a, 0xd5, 0x34, 0xdd, 0xdd, 0x02, 0x7b, 0x61, 0x7a, 0x9b, 0x75, 0x26, 0x80, 0x52, 0x4d, 0x4f,
0x9c, 0x77, 0xe0, 0x65, 0x88, 0x41, 0xbd, 0x1b, 0x2e, 0xe8, 0x2c, 0xb3, 0x23, 0xfe, 0xbd, 0x59,
0xb3, 0x86, 0x5d, 0x47, 0x89, 0xa0, 0x79, 0x18, 0x5b, 0x03, 0xeb, 0x93, 0xbf, 0xbe, 0x01, 0xc2,
0x89, 0x6f, 0xd1, 0x8f, 0xcd, 0x43, 0x29, 0x5c, 0xac, 0x1d, 0xbb, 0x94, 0x2e, 0xa0, 0x93, 0xf4,
0x75, 0xc0, 0x8f, 0x95, 0xb1, 0xed, 0x70, 0xd3, 0xee, 0x79, 0x45, 0x86, 0x43, 0x12, 0x1e, 0x98,
0x16, 0x87, 0x02, 0xe3, 0x4d, 0xeb, 0x84, 0x54, 0x51, 0x16, 0xf2, 0x90, 0x38, 0xf3, 0x16, 0xdf,
0x4c, 0xa7, 0x93, 0xf4, 0xda, 0x46, 0x9b, 0x97, 0xf9, 0x1a, 0x64, 0xa4, 0x63, 0x27, 0xdd, 0x63,
0xfd, 0xf5, 0x49, 0xa2, 0x88, 0x16, 0x16, 0x6c, 0xb7, 0x97, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3,
0x4a, 0x30, 0x48, 0x30, 0x46, 0x06, 0x03, 0x55, 0x1d, 0x01, 0x04, 0x3f, 0x30, 0x3d, 0x80, 0x10,
0x30, 0xee, 0xac, 0xc5, 0xef, 0x8c, 0x5d, 0xc9, 0x8d, 0x27, 0xf9, 0xf7, 0x10, 0x8e, 0x2a, 0x36,
0xa1, 0x17, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54,
0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32, 0x82, 0x10, 0xf5, 0x2e, 0x37, 0xa1, 0x46,
0xba, 0xa3, 0xbf, 0x4d, 0xb5, 0xb9, 0xb3, 0xd1, 0xa1, 0x12, 0xa2, 0x30, 0x0d, 0x06, 0x09, 0x2a,
0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x29, 0xee,
0xba, 0x06, 0x6c, 0x6a, 0xad, 0xb6, 0x4d, 0x06, 0x8e, 0xdd, 0xd8, 0x0c, 0x26, 0xee, 0x09, 0x0d,
0xf9, 0xbb, 0x44, 0x7f, 0x06, 0xd0, 0x76, 0xa8, 0xec, 0xb2, 0x72, 0xcc, 0xce, 0xd8, 0xcc, 0x7f,
0x37, 0x2c, 0xbc, 0x9d, 0xa0, 0x32, 0x29, 0x1e, 0xe4, 0x2f, 0x57, 0xe8, 0xcb, 0x74, 0xa4, 0x90,
0x60, 0x9c, 0xec, 0x61, 0x4f, 0x09, 0xe5, 0xc3, 0x44, 0x4a, 0xed, 0x8e, 0x44, 0x3a, 0xf0, 0x66,
0x31, 0xda, 0xb8, 0xd9, 0x2f, 0x38, 0x7c, 0xb3, 0xc9, 0x9b, 0xc4, 0xa3, 0x9f, 0x73, 0x95, 0x66,
0x18, 0x99, 0x9d, 0xdb, 0x36, 0x84, 0x40, 0x46, 0x35, 0x2b, 0x68, 0x95, 0xb7, 0x4e, 0x6f, 0x77,
0x07, 0x66, 0xdb, 0xde, 0x5f, 0x41, 0xd0, 0x19, 0xbd, 0x8e, 0x8f, 0x8b, 0x1f, 0x77, 0xff, 0x34,
0xa9, 0x7a, 0x58, 0xdc, 0x9f, 0x2d, 0xd6, 0x2c, 0xe6, 0x76, 0x0a, 0x92, 0x30, 0x47, 0x31, 0x81,
0xd2, 0x30, 0x81, 0xcf, 0x02, 0x01, 0x01, 0x30, 0x29, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06,
0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32,
0x02, 0x10, 0xf5, 0x2e, 0x37, 0xa1, 0x46, 0xba, 0xa3, 0xbf, 0x4d, 0xb5, 0xb9, 0xb3, 0xd1, 0xa1,
0x12, 0xa2, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05,
0x00, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00,
0x04, 0x81, 0x80, 0x3c, 0x6d, 0xb9, 0xfc, 0xf5, 0xc2, 0x51, 0x10, 0x40, 0x18, 0xae, 0xcd, 0xe8,
0x86, 0xdb, 0xfc, 0x8c, 0xd7, 0xfa, 0x61, 0x7d, 0xa8, 0xc8, 0x06, 0x01, 0xf2, 0x08, 0x2d, 0x22,
0x0c, 0x40, 0x25, 0xa8, 0xd4, 0x25, 0xad, 0x44, 0x53, 0xce, 0x30, 0x77, 0x1b, 0x88, 0xdc, 0xa2,
0x29, 0x4e, 0xec, 0x8c, 0x24, 0x6f, 0x17, 0x69, 0xed, 0x59, 0x7e, 0x73, 0x0d, 0xd8, 0x51, 0x68,
0xc3, 0x84, 0xe9, 0x46, 0x1b, 0x6b, 0x00, 0x5b, 0x64, 0xca, 0xf6, 0xac, 0x6e, 0x05, 0x41, 0x06,
0x3c, 0xbf, 0x9e, 0x57, 0x54, 0x27, 0x26, 0x96, 0x14, 0x3c, 0x2a, 0x62, 0x8a, 0xe8, 0x7f, 0x7f,
0xe5, 0x3d, 0x8d, 0x8f, 0x89, 0x81, 0x81, 0xbc, 0x68, 0xb1, 0x89, 0x21, 0x35, 0x59, 0xc6, 0x0b,
0x6f, 0xb7, 0x87, 0xe7, 0xdd, 0x17, 0x2f, 0x7b, 0x8b, 0x4a, 0x2d, 0x9c, 0xa0, 0x72, 0x21, 0xc4,
0x3d, 0xc1, 0xea, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
0x37, 0x38, 0x39
};

STATIC UINT8 mAuthVarDERAppendKey1[] = {
0xdc, 0x07, 0x0b, 0x0f, 0x0b, 0x28, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x13, 0x03, 0x00, 0x00, 0x00, 0x02, 0xf1, 0x0e, 0x9d, 0xd2, 0xaf, 0x4a, 0xdf, 0x68, 0xee, 0x49,
0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7, 0x30, 0x82, 0x02, 0xf7, 0x02, 0x01, 0x01, 0x31,
0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00,
0x30, 0x0b, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, 0x01,
0xfd, 0x30, 0x82, 0x01, 0xf9, 0x30, 0x82, 0x01, 0x62, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10,
0xf5, 0x2e, 0x37, 0xa1, 0x46, 0xba, 0xa3, 0xbf, 0x4d, 0xb5, 0xb9, 0xb3, 0xd1, 0xa1, 0x12, 0xa2,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30,
0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74,
0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x32, 0x31, 0x31, 0x31, 0x35,
0x30, 0x33, 0x31, 0x32, 0x31, 0x38, 0x5a, 0x17, 0x0d, 0x33, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32,
0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04,
0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32, 0x30, 0x81, 0x9f,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03,
0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xbc, 0x7f, 0x91, 0x7d, 0xbd, 0x73,
0x3a, 0xd5, 0x34, 0xdd, 0xdd, 0x02, 0x7b, 0x61, 0x7a, 0x9b, 0x75, 0x26, 0x80, 0x52, 0x4d, 0x4f,
0x9c, 0x77, 0xe0, 0x65, 0x88, 0x41, 0xbd, 0x1b, 0x2e, 0xe8, 0x2c, 0xb3, 0x23, 0xfe, 0xbd, 0x59,
0xb3, 0x86, 0x5d, 0x47, 0x89, 0xa0, 0x79, 0x18, 0x5b, 0x03, 0xeb, 0x93, 0xbf, 0xbe, 0x01, 0xc2,
0x89, 0x6f, 0xd1, 0x8f, 0xcd, 0x43, 0x29, 0x5c, 0xac, 0x1d, 0xbb, 0x94, 0x2e, 0xa0, 0x93, 0xf4,
0x75, 0xc0, 0x8f, 0x95, 0xb1, 0xed, 0x70, 0xd3, 0xee, 0x79, 0x45, 0x86, 0x43, 0x12, 0x1e, 0x98,
0x16, 0x87, 0x02, 0xe3, 0x4d, 0xeb, 0x84, 0x54, 0x51, 0x16, 0xf2, 0x90, 0x38, 0xf3, 0x16, 0xdf,
0x4c, 0xa7, 0x93, 0xf4, 0xda, 0x46, 0x9b, 0x97, 0xf9, 0x1a, 0x64, 0xa4, 0x63, 0x27, 0xdd, 0x63,
0xfd, 0xf5, 0x49, 0xa2, 0x88, 0x16, 0x16, 0x6c, 0xb7, 0x97, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3,
0x4a, 0x30, 0x48, 0x30, 0x46, 0x06, 0x03, 0x55, 0x1d, 0x01, 0x04, 0x3f, 0x30, 0x3d, 0x80, 0x10,
0x30, 0xee, 0xac, 0xc5, 0xef, 0x8c, 0x5d, 0xc9, 0x8d, 0x27, 0xf9, 0xf7, 0x10, 0x8e, 0x2a, 0x36,
0xa1, 0x17, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54,
0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32, 0x82, 0x10, 0xf5, 0x2e, 0x37, 0xa1, 0x46,
0xba, 0xa3, 0xbf, 0x4d, 0xb5, 0xb9, 0xb3, 0xd1, 0xa1, 0x12, 0xa2, 0x30, 0x0d, 0x06, 0x09, 0x2a,
0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x29, 0xee,
0xba, 0x06, 0x6c, 0x6a, 0xad, 0xb6, 0x4d, 0x06, 0x8e, 0xdd, 0xd8, 0x0c, 0x26, 0xee, 0x09, 0x0d,
0xf9, 0xbb, 0x44, 0x7f, 0x06, 0xd0, 0x76, 0xa8, 0xec, 0xb2, 0x72, 0xcc, 0xce, 0xd8, 0xcc, 0x7f,
0x37, 0x2c, 0xbc, 0x9d, 0xa0, 0x32, 0x29, 0x1e, 0xe4, 0x2f, 0x57, 0xe8, 0xcb, 0x74, 0xa4, 0x90,
0x60, 0x9c, 0xec, 0x61, 0x4f, 0x09, 0xe5, 0xc3, 0x44, 0x4a, 0xed, 0x8e, 0x44, 0x3a, 0xf0, 0x66,
0x31, 0xda, 0xb8, 0xd9, 0x2f, 0x38, 0x7c, 0xb3, 0xc9, 0x9b, 0xc4, 0xa3, 0x9f, 0x73, 0x95, 0x66,
0x18, 0x99, 0x9d, 0xdb, 0x36, 0x84, 0x40, 0x46, 0x35, 0x2b, 0x68, 0x95, 0xb7, 0x4e, 0x6f, 0x77,
0x07, 0x66, 0xdb, 0xde, 0x5f, 0x41, 0xd0, 0x19, 0xbd, 0x8e, 0x8f, 0x8b, 0x1f, 0x77, 0xff, 0x34,
0xa9, 0x7a, 0x58, 0xdc, 0x9f, 0x2d, 0xd6, 0x2c, 0xe6, 0x76, 0x0a, 0x92, 0x30, 0x47, 0x31, 0x81,
0xd2, 0x30, 0x81, 0xcf, 0x02, 0x01, 0x01, 0x30, 0x29, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06,
0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32,
0x02, 0x10, 0xf5, 0x2e, 0x37, 0xa1, 0x46, 0xba, 0xa3, 0xbf, 0x4d, 0xb5, 0xb9, 0xb3, 0xd1, 0xa1,
0x12, 0xa2, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05,
0x00, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00,
0x04, 0x81, 0x80, 0x60, 0xc4, 0x9b, 0xfc, 0xd7, 0xad, 0xa2, 0x23, 0x4a, 0x1b, 0xda, 0x99, 0xa6,
0x0b, 0x3c, 0x6c, 0x54, 0x17, 0x97, 0x66, 0xd6, 0x75, 0x93, 0xfa, 0x92, 0x7a, 0x2a, 0x5b, 0x7e,
0xbf, 0x5c, 0xa3, 0x7a, 0x99, 0xd7, 0xda, 0x4c, 0x34, 0x04, 0x58, 0xb0, 0x14, 0x1d, 0x88, 0xf7,
0x3f, 0x9a, 0x26, 0x7f, 0xbf, 0xfb, 0xea, 0xaa, 0x8f, 0x22, 0xff, 0x7f, 0xd2, 0xe0, 0x24, 0x05,
0x3c, 0x45, 0x22, 0xad, 0x92, 0xfe, 0x99, 0x24, 0xa3, 0x93, 0x4a, 0x1a, 0xb7, 0xa1, 0x66, 0x89,
0x7f, 0x6e, 0x2b, 0x19, 0x50, 0x9d, 0x01, 0x66, 0x60, 0x54, 0x16, 0x69, 0x8e, 0xa2, 0x8a, 0x84,
0x4a, 0xa6, 0xfa, 0x19, 0x33, 0x2e, 0xea, 0xeb, 0x39, 0xb8, 0x1c, 0x50, 0x68, 0xfc, 0xca, 0x40,
0x56, 0x9e, 0x81, 0x0f, 0x62, 0xb4, 0x53, 0x8a, 0xde, 0x52, 0x71, 0x46, 0x91, 0x4d, 0xb7, 0xe7,
0x40, 0x0f, 0x84, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
0x37, 0x38, 0x39
};

STATIC UINT8 mAuthVarDERUpdateKey1[] = {
0xdc, 0x07, 0x0b, 0x0f, 0x0b, 0x27, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x13, 0x03, 0x00, 0x00, 0x00, 0x02, 0xf1, 0x0e, 0x9d, 0xd2, 0xaf, 0x4a, 0xdf, 0x68, 0xee, 0x49,
0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7, 0x30, 0x82, 0x02, 0xf7, 0x02, 0x01, 0x01, 0x31,
0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00,
0x30, 0x0b, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, 0x01,
0xfd, 0x30, 0x82, 0x01, 0xf9, 0x30, 0x82, 0x01, 0x62, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10,
0xf5, 0x2e, 0x37, 0xa1, 0x46, 0xba, 0xa3, 0xbf, 0x4d, 0xb5, 0xb9, 0xb3, 0xd1, 0xa1, 0x12, 0xa2,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30,
0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74,
0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x32, 0x31, 0x31, 0x31, 0x35,
0x30, 0x33, 0x31, 0x32, 0x31, 0x38, 0x5a, 0x17, 0x0d, 0x33, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32,
0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04,
0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32, 0x30, 0x81, 0x9f,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03,
0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xbc, 0x7f, 0x91, 0x7d, 0xbd, 0x73,
0x3a, 0xd5, 0x34, 0xdd, 0xdd, 0x02, 0x7b, 0x61, 0x7a, 0x9b, 0x75, 0x26, 0x80, 0x52, 0x4d, 0x4f,
0x9c, 0x77, 0xe0, 0x65, 0x88, 0x41, 0xbd, 0x1b, 0x2e, 0xe8, 0x2c, 0xb3, 0x23, 0xfe, 0xbd, 0x59,
0xb3, 0x86, 0x5d, 0x47, 0x89, 0xa0, 0x79, 0x18, 0x5b, 0x03, 0xeb, 0x93, 0xbf, 0xbe, 0x01, 0xc2,
0x89, 0x6f, 0xd1, 0x8f, 0xcd, 0x43, 0x29, 0x5c, 0xac, 0x1d, 0xbb, 0x94, 0x2e, 0xa0, 0x93, 0xf4,
0x75, 0xc0, 0x8f, 0x95, 0xb1, 0xed, 0x70, 0xd3, 0xee, 0x79, 0x45, 0x86, 0x43, 0x12, 0x1e, 0x98,
0x16, 0x87, 0x02, 0xe3, 0x4d, 0xeb, 0x84, 0x54, 0x51, 0x16, 0xf2, 0x90, 0x38, 0xf3, 0x16, 0xdf,
0x4c, 0xa7, 0x93, 0xf4, 0xda, 0x46, 0x9b, 0x97, 0xf9, 0x1a, 0x64, 0xa4, 0x63, 0x27, 0xdd, 0x63,
0xfd, 0xf5, 0x49, 0xa2, 0x88, 0x16, 0x16, 0x6c, 0xb7, 0x97, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3,
0x4a, 0x30, 0x48, 0x30, 0x46, 0x06, 0x03, 0x55, 0x1d, 0x01, 0x04, 0x3f, 0x30, 0x3d, 0x80, 0x10,
0x30, 0xee, 0xac, 0xc5, 0xef, 0x8c, 0x5d, 0xc9, 0x8d, 0x27, 0xf9, 0xf7, 0x10, 0x8e, 0x2a, 0x36,
0xa1, 0x17, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54,
0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32, 0x82, 0x10, 0xf5, 0x2e, 0x37, 0xa1, 0x46,
0xba, 0xa3, 0xbf, 0x4d, 0xb5, 0xb9, 0xb3, 0xd1, 0xa1, 0x12, 0xa2, 0x30, 0x0d, 0x06, 0x09, 0x2a,
0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x29, 0xee,
0xba, 0x06, 0x6c, 0x6a, 0xad, 0xb6, 0x4d, 0x06, 0x8e, 0xdd, 0xd8, 0x0c, 0x26, 0xee, 0x09, 0x0d,
0xf9, 0xbb, 0x44, 0x7f, 0x06, 0xd0, 0x76, 0xa8, 0xec, 0xb2, 0x72, 0xcc, 0xce, 0xd8, 0xcc, 0x7f,
0x37, 0x2c, 0xbc, 0x9d, 0xa0, 0x32, 0x29, 0x1e, 0xe4, 0x2f, 0x57, 0xe8, 0xcb, 0x74, 0xa4, 0x90,
0x60, 0x9c, 0xec, 0x61, 0x4f, 0x09, 0xe5, 0xc3, 0x44, 0x4a, 0xed, 0x8e, 0x44, 0x3a, 0xf0, 0x66,
0x31, 0xda, 0xb8, 0xd9, 0x2f, 0x38, 0x7c, 0xb3, 0xc9, 0x9b, 0xc4, 0xa3, 0x9f, 0x73, 0x95, 0x66,
0x18, 0x99, 0x9d, 0xdb, 0x36, 0x84, 0x40, 0x46, 0x35, 0x2b, 0x68, 0x95, 0xb7, 0x4e, 0x6f, 0x77,
0x07, 0x66, 0xdb, 0xde, 0x5f, 0x41, 0xd0, 0x19, 0xbd, 0x8e, 0x8f, 0x8b, 0x1f, 0x77, 0xff, 0x34,
0xa9, 0x7a, 0x58, 0xdc, 0x9f, 0x2d, 0xd6, 0x2c, 0xe6, 0x76, 0x0a, 0x92, 0x30, 0x47, 0x31, 0x81,
0xd2, 0x30, 0x81, 0xcf, 0x02, 0x01, 0x01, 0x30, 0x29, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06,
0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32,
0x02, 0x10, 0xf5, 0x2e, 0x37, 0xa1, 0x46, 0xba, 0xa3, 0xbf, 0x4d, 0xb5, 0xb9, 0xb3, 0xd1, 0xa1,
0x12, 0xa2, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05,
0x00, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00,
0x04, 0x81, 0x80, 0x49, 0x0a, 0x4a, 0xc5, 0x82, 0x2a, 0x53, 0x58, 0x02, 0x72, 0xdf, 0xdd, 0xde,
0x72, 0xf4, 0x44, 0xfa, 0x3d, 0x1a, 0xca, 0x28, 0x63, 0x54, 0xd8, 0x4f, 0x44, 0x83, 0xd2, 0x05,
0x15, 0xa5, 0xc9, 0x9b, 0x3f, 0x3c, 0x22, 0xac, 0xbe, 0x1a, 0x73, 0x17, 0x81, 0x17, 0x15, 0xc0,
0x4f, 0x05, 0xca, 0x82, 0x56, 0xf0, 0xc1, 0x23, 0xb6, 0x48, 0xa0, 0xac, 0x88, 0x0a, 0x43, 0x9d,
0x20, 0xbe, 0x82, 0x9b, 0x19, 0x1a, 0xfd, 0xae, 0x91, 0xd0, 0xc8, 0xb0, 0xb2, 0xd0, 0xa8, 0xf4,
0xdd, 0xe8, 0x07, 0x4c, 0x79, 0x50, 0xd6, 0x70, 0xd1, 0xa1, 0x1f, 0x50, 0xa2, 0xef, 0xa7, 0xc6,
0x18, 0x5e, 0xe9, 0xac, 0xd3, 0x5a, 0xf1, 0x57, 0xac, 0x62, 0x2c, 0x3e, 0x2a, 0xf3, 0x46, 0x13,
0xd4, 0x84, 0xc7, 0x2a, 0x17, 0x0c, 0x7d, 0xb3, 0x1e, 0x87, 0xab, 0xe5, 0xa3, 0x36, 0x6f, 0xc4,
0x70, 0xc1, 0x03, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
0x37, 0x38, 0x39 
};

STATIC UINT8 mAuthVarDERDelKey1[] = {
0xdc, 0x07, 0x0b, 0x0f, 0x0e, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x13, 0x03, 0x00, 0x00, 0x00, 0x02, 0xf1, 0x0e, 0x9d, 0xd2, 0xaf, 0x4a, 0xdf, 0x68, 0xee, 0x49,
0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7, 0x30, 0x82, 0x02, 0xf7, 0x02, 0x01, 0x01, 0x31,
0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00,
0x30, 0x0b, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, 0x01,
0xfd, 0x30, 0x82, 0x01, 0xf9, 0x30, 0x82, 0x01, 0x62, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10,
0xf5, 0x2e, 0x37, 0xa1, 0x46, 0xba, 0xa3, 0xbf, 0x4d, 0xb5, 0xb9, 0xb3, 0xd1, 0xa1, 0x12, 0xa2,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30,
0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74,
0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x32, 0x31, 0x31, 0x31, 0x35,
0x30, 0x33, 0x31, 0x32, 0x31, 0x38, 0x5a, 0x17, 0x0d, 0x33, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32,
0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04,
0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32, 0x30, 0x81, 0x9f,
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03,
0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xbc, 0x7f, 0x91, 0x7d, 0xbd, 0x73,
0x3a, 0xd5, 0x34, 0xdd, 0xdd, 0x02, 0x7b, 0x61, 0x7a, 0x9b, 0x75, 0x26, 0x80, 0x52, 0x4d, 0x4f,
0x9c, 0x77, 0xe0, 0x65, 0x88, 0x41, 0xbd, 0x1b, 0x2e, 0xe8, 0x2c, 0xb3, 0x23, 0xfe, 0xbd, 0x59,
0xb3, 0x86, 0x5d, 0x47, 0x89, 0xa0, 0x79, 0x18, 0x5b, 0x03, 0xeb, 0x93, 0xbf, 0xbe, 0x01, 0xc2,
0x89, 0x6f, 0xd1, 0x8f, 0xcd, 0x43, 0x29, 0x5c, 0xac, 0x1d, 0xbb, 0x94, 0x2e, 0xa0, 0x93, 0xf4,
0x75, 0xc0, 0x8f, 0x95, 0xb1, 0xed, 0x70, 0xd3, 0xee, 0x79, 0x45, 0x86, 0x43, 0x12, 0x1e, 0x98,
0x16, 0x87, 0x02, 0xe3, 0x4d, 0xeb, 0x84, 0x54, 0x51, 0x16, 0xf2, 0x90, 0x38, 0xf3, 0x16, 0xdf,
0x4c, 0xa7, 0x93, 0xf4, 0xda, 0x46, 0x9b, 0x97, 0xf9, 0x1a, 0x64, 0xa4, 0x63, 0x27, 0xdd, 0x63,
0xfd, 0xf5, 0x49, 0xa2, 0x88, 0x16, 0x16, 0x6c, 0xb7, 0x97, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3,
0x4a, 0x30, 0x48, 0x30, 0x46, 0x06, 0x03, 0x55, 0x1d, 0x01, 0x04, 0x3f, 0x30, 0x3d, 0x80, 0x10,
0x30, 0xee, 0xac, 0xc5, 0xef, 0x8c, 0x5d, 0xc9, 0x8d, 0x27, 0xf9, 0xf7, 0x10, 0x8e, 0x2a, 0x36,
0xa1, 0x17, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54,
0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32, 0x82, 0x10, 0xf5, 0x2e, 0x37, 0xa1, 0x46,
0xba, 0xa3, 0xbf, 0x4d, 0xb5, 0xb9, 0xb3, 0xd1, 0xa1, 0x12, 0xa2, 0x30, 0x0d, 0x06, 0x09, 0x2a,
0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x29, 0xee,
0xba, 0x06, 0x6c, 0x6a, 0xad, 0xb6, 0x4d, 0x06, 0x8e, 0xdd, 0xd8, 0x0c, 0x26, 0xee, 0x09, 0x0d,
0xf9, 0xbb, 0x44, 0x7f, 0x06, 0xd0, 0x76, 0xa8, 0xec, 0xb2, 0x72, 0xcc, 0xce, 0xd8, 0xcc, 0x7f,
0x37, 0x2c, 0xbc, 0x9d, 0xa0, 0x32, 0x29, 0x1e, 0xe4, 0x2f, 0x57, 0xe8, 0xcb, 0x74, 0xa4, 0x90,
0x60, 0x9c, 0xec, 0x61, 0x4f, 0x09, 0xe5, 0xc3, 0x44, 0x4a, 0xed, 0x8e, 0x44, 0x3a, 0xf0, 0x66,
0x31, 0xda, 0xb8, 0xd9, 0x2f, 0x38, 0x7c, 0xb3, 0xc9, 0x9b, 0xc4, 0xa3, 0x9f, 0x73, 0x95, 0x66,
0x18, 0x99, 0x9d, 0xdb, 0x36, 0x84, 0x40, 0x46, 0x35, 0x2b, 0x68, 0x95, 0xb7, 0x4e, 0x6f, 0x77,
0x07, 0x66, 0xdb, 0xde, 0x5f, 0x41, 0xd0, 0x19, 0xbd, 0x8e, 0x8f, 0x8b, 0x1f, 0x77, 0xff, 0x34,
0xa9, 0x7a, 0x58, 0xdc, 0x9f, 0x2d, 0xd6, 0x2c, 0xe6, 0x76, 0x0a, 0x92, 0x30, 0x47, 0x31, 0x81,
0xd2, 0x30, 0x81, 0xcf, 0x02, 0x01, 0x01, 0x30, 0x29, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06,
0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x30, 0x32,
0x02, 0x10, 0xf5, 0x2e, 0x37, 0xa1, 0x46, 0xba, 0xa3, 0xbf, 0x4d, 0xb5, 0xb9, 0xb3, 0xd1, 0xa1,
0x12, 0xa2, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05,
0x00, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00,
0x04, 0x81, 0x80, 0x7b, 0x76, 0xe6, 0x57, 0x96, 0x88, 0x2b, 0x7b, 0x0d, 0x38, 0x75, 0xba, 0x81,
0x7b, 0x6c, 0x84, 0xe9, 0xda, 0x4b, 0xce, 0x4e, 0x52, 0x4b, 0xd6, 0xf0, 0xa8, 0x1c, 0x1b, 0xc5,
0xd8, 0x3f, 0x7e, 0x22, 0xe4, 0xde, 0x62, 0xa5, 0xef, 0x2c, 0x33, 0xb8, 0x33, 0x5e, 0x8c, 0xd0,
0x61, 0x71, 0xd0, 0x4c, 0x43, 0xf2, 0xac, 0xb0, 0x4d, 0x5f, 0xa9, 0xeb, 0x96, 0x2e, 0x73, 0x70,
0xf4, 0x51, 0x82, 0x71, 0x43, 0x12, 0xd8, 0x17, 0xeb, 0xd5, 0x86, 0x1b, 0x25, 0xba, 0xd9, 0xba,
0xcf, 0xb9, 0xe9, 0xe5, 0x29, 0x69, 0x3c, 0x54, 0x36, 0x2a, 0x4d, 0x0f, 0x55, 0xde, 0xb3, 0xd7,
0x3a, 0xc6, 0x90, 0x3e, 0xcc, 0x01, 0x3d, 0x19, 0xcb, 0x5e, 0x22, 0x1c, 0xb2, 0xa6, 0xc4, 0xda,
0xe7, 0x1f, 0xd4, 0xbc, 0xf8, 0xa2, 0x2c, 0xc1, 0xe2, 0x9e, 0x58, 0xbb, 0xd5, 0x2e, 0xc1, 0x0c,
0xdb, 0x1a, 0xad 
};

STATIC EFI_GUID mVarVendorGuid = {0x15EDF297, 0xE832, 0x4d30, {0x82, 0x00, 0xA5, 0x25, 0xA9, 0x31, 0xE3, 0x3E}};

EFI_STATUS
AuthVariableDERFuncTest (
  IN EFI_BB_TEST_PROTOCOL       *This,
  IN VOID                       *ClientInterface,
  IN EFI_TEST_LEVEL             TestLevel,
  IN EFI_HANDLE                 SupportHandle
  )
{
  EFI_STATUS                          Status;
  EFI_RUNTIME_SERVICES                *RT;
  EFI_STANDARD_TEST_LIBRARY_PROTOCOL  *StandardLib;
  EFI_TEST_RECOVERY_LIBRARY_PROTOCOL  *RecoveryLib;
  EFI_TEST_LOGGING_LIBRARY_PROTOCOL   *LoggingLib;
  UINT32                              Attr;
  EFI_TEST_ASSERTION                  Result;

  UINTN                               DataSize;
  UINT8                               Data[50];

  Status = GetTestSupportLibrary (
             SupportHandle,
             &StandardLib,
             &RecoveryLib,
             &LoggingLib
             );
  if (EFI_ERROR(Status)) {
    return Status;
  }

  RT = (EFI_RUNTIME_SERVICES *)ClientInterface;

  Attr = EFI_VARIABLE_NON_VOLATILE | 
         EFI_VARIABLE_RUNTIME_ACCESS | 
         EFI_VARIABLE_BOOTSERVICE_ACCESS |
         EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS;

  //Call SetVariable to create the auth variable 
  Status = RT->SetVariable(
                 L"AuthVarDER01", 
                 &mVarVendorGuid, 
                 Attr, 
                 sizeof(mAuthVarDERCreateKey0), 
                 (VOID*)mAuthVarDERCreateKey0
                 );
  if (EFI_ERROR(Status)) {
    Result = EFI_TEST_ASSERTION_FAILED;
  } else {
    Result = EFI_TEST_ASSERTION_PASSED;
  }
  StandardLib->RecordAssertion (
                 StandardLib,
                 Result,
                 gVariableServicesBbTestFunctionAssertionGuid029,
                 L"RT.SetVariable - Create one Time Base Auth Variable, the expect return status should be EFI_SUCCESS",
                 L"%a:%d:Status - %r",
                 __FILE__,
                 (UINTN)__LINE__,
                 Status
                 );

  if (EFI_ERROR(Status)) {
    return Status;
  }

  DataSize = 50;
  Status = RT->GetVariable(
                 L"AuthVarDER01",
                 &mVarVendorGuid,
                 &Attr,
                 &DataSize,
                 Data
                 );

  if (Status == EFI_SUCCESS && DataSize == 10 && Data[0] == 0x30 && Data[1] == 0x31 && Data[2] == 0x32 && Data[3] == 0x33 &&
  	Data[4] == 0x34 && Data[5] == 0x35 && Data[6] == 0x36 && Data[7] == 0x37 && Data[8] == 0x38 && Data[9] == 0x39) {
    Result = EFI_TEST_ASSERTION_PASSED;
  } else {
    Result = EFI_TEST_ASSERTION_FAILED;
  }

  StandardLib->RecordAssertion (
                 StandardLib,
                 Result,
                 gVariableServicesBbTestFunctionAssertionGuid030,
                 L"RT.SetVariable - The Created Time Base Auth Variable should pass the data validation",
                 L"%a:%d:Status - %r",
                 __FILE__,
                 (UINTN)__LINE__,
                 Status
                 );

  if (Result == EFI_TEST_ASSERTION_FAILED) {
    return Status;
  }
  

  //The 2nd Call SetVariable with the same Data, the return status should be EFI_SECURITY_VIOLATION.
  Status = RT->SetVariable(
                 L"AuthVarDER01", 
                 &mVarVendorGuid, 
                 Attr, 
                 sizeof(mAuthVarDERCreateKey0), 
                 (VOID*)mAuthVarDERCreateKey0
                 );
  if (Status != EFI_SECURITY_VIOLATION) {
    Result = EFI_TEST_ASSERTION_FAILED;
  } else {
    Result = EFI_TEST_ASSERTION_PASSED;
  }
  StandardLib->RecordAssertion (
                 StandardLib,
                 Result,
                 gVariableServicesBbTestFunctionAssertionGuid031,
                 L"RT.SetVariable - The 2nd Call SetVariable with the same Data, the return status should be EFI_SECURITY_VIOLATION",
                 L"%a:%d:Status - %r",
                 __FILE__,
                 (UINTN)__LINE__,
                 Status
                 );

  if (Status != EFI_SECURITY_VIOLATION) {
    return Status;
  }

  //Modify the auth info in Data, then call SetVariable, the expect status should be EFI_SECURITY_VIOLATION.
  Status = RT->SetVariable(
                 L"AuthVarDER01", 
                 &mVarVendorGuid, 
                 Attr, 
                 sizeof(mAuthVarDERModifyKey0), 
                 (VOID*)mAuthVarDERModifyKey0
                 );
  if (Status != EFI_SECURITY_VIOLATION) {
    Result = EFI_TEST_ASSERTION_FAILED;
  } else {
    Result = EFI_TEST_ASSERTION_PASSED;
  }
  StandardLib->RecordAssertion (
                 StandardLib,
                 Result,
                 gVariableServicesBbTestFunctionAssertionGuid032,
                 L"RT.SetVariable - Call SetVariable with invalid Auth info, the return status should be EFI_SECURITY_VIOLATION",
                 L"%a:%d:Status - %r",
                 __FILE__,
                 (UINTN)__LINE__,
                 Status
                 );

  if (Status != EFI_SECURITY_VIOLATION) {
    return Status;
  }

  //SetVariable to new value by using the same key but a new timestamp, it should succeed. 
  Status = RT->SetVariable(
                 L"AuthVarDER01", 
                 &mVarVendorGuid, 
                 Attr, 
                 sizeof(mAuthVarDERNewValueKey0), 
                 (VOID*)mAuthVarDERNewValueKey0
                 );
  if (Status != EFI_SUCCESS) {
    Result = EFI_TEST_ASSERTION_FAILED;
  } else {
    Result = EFI_TEST_ASSERTION_PASSED;
  }
  StandardLib->RecordAssertion (
                 StandardLib,
                 Result,
                 gVariableServicesBbTestFunctionAssertionGuid033,
                 L"RT.SetVariable - SetVariable to new value by using the same key but a new timestamp, it should succeed",
                 L"%a:%d:Status - %r",
                 __FILE__,
                 (UINTN)__LINE__,
                 Status
                 );

  if (Status != EFI_SUCCESS) {
    return Status;
  }

  DataSize = 50;
  Status = RT->GetVariable(
                 L"AuthVarDER01",
                 &mVarVendorGuid,
                 &Attr,
                 &DataSize,
                 Data
                 );

  if (Status == EFI_SUCCESS && DataSize == 16 && Data[0] == 0x41 && Data[1] == 0x42 && Data[2] == 0x43 && Data[3] == 0x44 &&
  	Data[4] == 0x45 && Data[5] == 0x46 && Data[6] == 0x30 && Data[7] == 0x31 && Data[8] == 0x32 && Data[9] == 0x33 && 
  	Data[10] == 0x34 && Data[11] == 0x35 && Data[12] == 0x36 && Data[13] == 0x37 && Data[14] == 0x38 && Data[15] == 0x39) {
    Result = EFI_TEST_ASSERTION_PASSED;
  } else {
    Result = EFI_TEST_ASSERTION_FAILED;
  }

  StandardLib->RecordAssertion (
                 StandardLib,
                 Result,
                 gVariableServicesBbTestFunctionAssertionGuid034,
                 L"RT.SetVariable - The new value in the Time Base Auth Variable should pass the data validation",
                 L"%a:%d:Status - %r",
                 __FILE__,
                 (UINTN)__LINE__,
                 Status
                 );

  if (Result == EFI_TEST_ASSERTION_FAILED) {
    return Status;
  }

  //SetVariable with the old data and one old timestamp, the expect status should be EFI_SECURITY_VIOLATION.
  Status = RT->SetVariable(
                 L"AuthVarDER01", 
                 &mVarVendorGuid, 
                 Attr, 
                 sizeof(mAuthVarDERCreateKey0), 
                 (VOID*)mAuthVarDERCreateKey0
                 );
  if (Status != EFI_SECURITY_VIOLATION) {
    Result = EFI_TEST_ASSERTION_FAILED;
  } else {
    Result = EFI_TEST_ASSERTION_PASSED;
  }
  StandardLib->RecordAssertion (
                 StandardLib,
                 Result,
                 gVariableServicesBbTestFunctionAssertionGuid035,
                 L"RT.SetVariable - SetVariable with the old data and one old timestamp, the expect status should be EFI_SECURITY_VIOLATION",
                 L"%a:%d:Status - %r",
                 __FILE__,
                 (UINTN)__LINE__,
                 Status
                 );

  if (Status != EFI_SECURITY_VIOLATION) {
    return Status;
  }
  
  //SetVariable with one existing variable but Data area is changed due to different key and valid, the call should return EFI_SECURITY_VIOLATION.
  Status = RT->SetVariable(
                 L"AuthVarDER01", 
                 &mVarVendorGuid, 
                 Attr, 
                 sizeof(mAuthVarDERKey1), 
                 (VOID*)mAuthVarDERKey1
                 );
  if (Status != EFI_SECURITY_VIOLATION) {
    Result = EFI_TEST_ASSERTION_FAILED;
  } else {
    Result = EFI_TEST_ASSERTION_PASSED;
  }
  StandardLib->RecordAssertion (
                 StandardLib,
                 Result,
                 gVariableServicesBbTestFunctionAssertionGuid036,
                 L"RT.SetVariable - SetVariable with one existing variable but Data area is changed due to different key and valid, the call should return EFI_SECURITY_VIOLATION",
                 L"%a:%d:Status - %r",
                 __FILE__,
                 (UINTN)__LINE__,
                 Status
                 );

  if (Status != EFI_SECURITY_VIOLATION) {
    return Status;
  }

  //SetVariable to execute the normal append operation
  Status = RT->SetVariable(
                 L"AuthVarDER01", 
                 &mVarVendorGuid, 
                 Attr | EFI_VARIABLE_APPEND_WRITE, 
                 sizeof(mAuthVarDERAppendKey0), 
                 (VOID*)mAuthVarDERAppendKey0
                 );
  if (Status != EFI_SUCCESS && Status != EFI_INVALID_PARAMETER) {
    Result = EFI_TEST_ASSERTION_FAILED;
  } else {
    Result = EFI_TEST_ASSERTION_PASSED;
  }
  StandardLib->RecordAssertion (
                 StandardLib,
                 Result,
                 gVariableServicesBbTestFunctionAssertionGuid037,
                 L"RT.SetVariable - The Time Base Auth Variable Append operation should succeed",
                 L"%a:%d:Status - %r",
                 __FILE__,
                 (UINTN)__LINE__,
                 Status
                 );  
  
  if (Status != EFI_SUCCESS && Status != EFI_INVALID_PARAMETER) {
    return Status;
  }

  if (Status == EFI_SUCCESS) {
    DataSize = 50;
    Status = RT->GetVariable(
                   L"AuthVarDER01",
                   &mVarVendorGuid,
                   &Attr,
                   &DataSize,
                   Data
                   );

    if (Status == EFI_SUCCESS && DataSize == 32 && Data[0] == 0x41 && Data[1] == 0x42 && Data[2] == 0x43 && Data[3] == 0x44 &&
  	  Data[4] == 0x45 && Data[5] == 0x46 && Data[6] == 0x30 && Data[7] == 0x31 && Data[8] == 0x32 && Data[9] == 0x33 && 
  	  Data[10] == 0x34 && Data[11] == 0x35 && Data[12] == 0x36 && Data[13] == 0x37 && Data[14] == 0x38 && Data[15] == 0x39 &&
  	  Data[16] == 0x41 && Data[17] == 0x42 && Data[18] == 0x43 && Data[19] == 0x44 && Data[20] == 0x45 && Data[21] == 0x46 && 
  	  Data[22] == 0x30 && Data[23] == 0x31 && Data[24] == 0x32 && Data[25] == 0x33 && Data[26] == 0x34 && Data[27] == 0x35 &&
  	  Data[28] == 0x36 && Data[29] == 0x37 && Data[30] == 0x38 && Data[31] == 0x39) {
      Result = EFI_TEST_ASSERTION_PASSED;
    } else {
      Result = EFI_TEST_ASSERTION_FAILED;
    }

    StandardLib->RecordAssertion (
                   StandardLib,
                   Result,
                   gVariableServicesBbTestFunctionAssertionGuid038,
                   L"RT.SetVariable - The Appended Time Base Auth Variable should pass the data validation",
                   L"%a:%d:Status - %r",
                   __FILE__,
                   (UINTN)__LINE__,
                   Status
                   );

    if (Result == EFI_TEST_ASSERTION_FAILED) {
      return Status;
    }
  }

  //SetVariable to execute the normal delete operation, and call GetVariable to ensure the auth variable is not found.
  Status = RT->SetVariable(
                 L"AuthVarDER01", 
                 &mVarVendorGuid, 
                 Attr, 
                 sizeof(mAuthVarDERDelKey0), 
                 (VOID*) mAuthVarDERDelKey0
                 );
  if (EFI_ERROR(Status)) {
    Result = EFI_TEST_ASSERTION_FAILED;
  } else {
    Result = EFI_TEST_ASSERTION_PASSED;
  }
  StandardLib->RecordAssertion (
                 StandardLib,
                 Result,
                 gVariableServicesBbTestFunctionAssertionGuid039,
                 L"RT.SetVariable - Del Time Base Auth Variable, the expect return status should be EFI_SUCCESS",
                 L"%a:%d:Status - %r",
                 __FILE__,
                 (UINTN)__LINE__,
                 Status
                 );

  if (EFI_ERROR(Status)) {
    return Status;
  }

  DataSize = 50;
  
  Status = RT->GetVariable(
                 L"AuthVarDER01",
                 &mVarVendorGuid,
                 &Attr,
                 &DataSize,
                 Data
                 );

  if (Status == EFI_NOT_FOUND) {
    Result = EFI_TEST_ASSERTION_PASSED;
  } else {
    Result = EFI_TEST_ASSERTION_FAILED;
  }

  StandardLib->RecordAssertion (
                 StandardLib,
                 Result,
                 gVariableServicesBbTestFunctionAssertionGuid040,
                 L"RT.SetVariable - The Deleted Time Base Auth Variable should not be found",
                 L"%a:%d:Status - %r",
                 __FILE__,
                 (UINTN)__LINE__,
                 Status
                 );
  
  if (Status != EFI_NOT_FOUND) {
    return Status;
  } 

  //SetVariable with one different key after the variable is deleted
  Status = RT->SetVariable(
                 L"AuthVarDER01", 
                 &mVarVendorGuid, 
                 Attr, 
                 sizeof(mAuthVarDERCreateKey1), 
                 (VOID*)mAuthVarDERCreateKey1
                 );
  if (Status != EFI_SUCCESS) {
    Result = EFI_TEST_ASSERTION_FAILED;
  } else {
    Result = EFI_TEST_ASSERTION_PASSED;
  }
  StandardLib->RecordAssertion (
                 StandardLib,
                 Result,
                 gVariableServicesBbTestFunctionAssertionGuid041,
                 L"RT.SetVariable - SetVariable with one different key after the original variable is deleted, the return status should be EFI_SUCCESS",
                 L"%a:%d:Status - %r",
                 __FILE__,
                 (UINTN)__LINE__,
                 Status
                 );

  if (Status != EFI_SUCCESS) {
    return Status;
  }

  //SetVariable to one existing variable with EFI_VARIABLE_APPEND_WRITE attribute and new data
  Status = RT->SetVariable(
                 L"AuthVarDER01", 
                 &mVarVendorGuid, 
                 Attr | EFI_VARIABLE_APPEND_WRITE, 
                 sizeof(mAuthVarDERAppendKey1), 
                 (VOID*)mAuthVarDERAppendKey1
                 );
  if (Status != EFI_SUCCESS && Status != EFI_INVALID_PARAMETER) {
    Result = EFI_TEST_ASSERTION_FAILED;
  } else {
    Result = EFI_TEST_ASSERTION_PASSED;
  }
  StandardLib->RecordAssertion (
                 StandardLib,
                 Result,
                 gVariableServicesBbTestFunctionAssertionGuid042,
                 L"RT.SetVariable - The Time Base Auth Variable Append operation should succeed",
                 L"%a:%d:Status - %r",
                 __FILE__,
                 (UINTN)__LINE__,
                 Status
                 );  
  
  if (Status != EFI_SUCCESS && Status != EFI_INVALID_PARAMETER) {
    return Status;
  }

  if (Status == EFI_SUCCESS) {
    //SetVariable with one old timestamp, the return status should be EFI_SECURITY_VIOLATION
    Status = RT->SetVariable(
                   L"AuthVarDER01", 
                   &mVarVendorGuid, 
                   Attr, 
                   sizeof(mAuthVarDERUpdateKey1), 
                   (VOID*)mAuthVarDERUpdateKey1
                   );
    if (Status != EFI_SECURITY_VIOLATION) {
      Result = EFI_TEST_ASSERTION_FAILED;
    } else {
      Result = EFI_TEST_ASSERTION_PASSED;
    }
    StandardLib->RecordAssertion (
                   StandardLib,
                   Result,
                   gVariableServicesBbTestFunctionAssertionGuid043,
                   L"RT.SetVariable - SetVariable with one old timestamp, the return status should be EFI_SECURITY_VIOLATION",
                   L"%a:%d:Status - %r",
                   __FILE__,
                   (UINTN)__LINE__,
                   Status
                   );

    if (Status != EFI_SECURITY_VIOLATION) {
      return Status;
    }
  }

  //SetVariable to delete
  Status = RT->SetVariable(
                 L"AuthVarDER01", 
                 &mVarVendorGuid, 
                 Attr, 
                 sizeof(mAuthVarDERDelKey1), 
                 (VOID*) mAuthVarDERDelKey1
                 );
  if (EFI_ERROR(Status)) {
    Result = EFI_TEST_ASSERTION_FAILED;
  } else {
    Result = EFI_TEST_ASSERTION_PASSED;
  }
  StandardLib->RecordAssertion (
                 StandardLib,
                 Result,
                 gVariableServicesBbTestFunctionAssertionGuid044,
                 L"RT.SetVariable - Del Time Base Auth Variable, the expect return status should be EFI_SUCCESS",
                 L"%a:%d:Status - %r",
                 __FILE__,
                 (UINTN)__LINE__,
                 Status
                 );

  if (EFI_ERROR(Status)) {
    return Status;
  }

  return Status;
}

